package day9;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class ReadAccount {
    public static void main(String[] args) {
        try {
            ObjectInputStream oin=new ObjectInputStream(new FileInputStream("bank.obj"));
            List<Account> list = (List<Account>) oin.readObject();
            oin.close();
            for(Account a:list)
                System.out.println(a);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
